\chapter{Arquivo de configuração do NSIS}
\label{cenario_anexo}

Para configuração dos cenários o arquivo nsis.conf recebe alterações conforme
posição de cada nó no domínio da rede.

Um exemplo do arquivo nsis.conf segue abaixo, bem como, em seguida ítens
específicos de cada nó.

Aquivo padrão: \textbf{nsis-0.6.0/bin/nsis.conf}
\begin{verbatim} 
# This is an example configuration file for NSIS
# Please change it to fit your needs (i.e. IP address configuration
# of your host).
# 
# For more information about the configuration, check the manual at
#   manual/Configuration

# *******************************************
# *****      General Configuration      *****
# *******************************************

# Start Ping and Diagnostics NSLP daemon together with GIST
nslp.startPing = yes
nslp.startQoS = yes
nslp.startNatFw = no
nslp.startDiag = no

# Accept explicitly routed messages (default is yes)
gist.acceptExplicitMessages = yes

# Accept GIST DATA messages that do not relate to any GIST state (default is
yes)
gist.acceptStatelessGistMessage = yes

# BSD only:
# List of interfaces where NSIS should listen on for GIST Queries
# Interfaces are separated by commas
#bsd.interfaces = ed0, ed1


# *******************************************
# *****  GIST Transport Configuration   *****
# *******************************************

## Policies which transport protocols are offered to peers. 
# Offer SCTP as transport to peers?
gist.offerSCTP = no

# Offer TLS over TCP as transport to peers?
gist.offerTLS = no

## Policies 
# Prefer SCTP over TCP as transfer protocol?
gist.useSCTP = no


# *******************************************
# *****    GIST Timer Configuration     *****
# *******************************************

## All Timeouts are measured in milliseconds

# How long do we wait for a Response to out initial Query?
# On retransmission, this value is doubled each time. (default: 10000 ms)
gist.timeout.waitForInitialResponse = 10000

# How long do we wait for a Confirm on the Receiver-Side? (default: 10000 ms)
gist.timeout.waitForConfirm = 10000

# How long do we wait between sending refreshing Queries? (default: 30000 ms)
gist.timeout.refreshInterval = 30000

# How long do we wait for a Response to a refreshing Query
# until state is removed? (default: 100000 ms)
gist.timeout.queryingNodeStateExpiration = 100000

# How long do we wait for a refreshing Query
# until state is removed? (default: 100000 ms)
gist.timeout.respondingNodeStateExpiration = 100000


# *******************************************
# ***** IP address/routing configurtion *****
# *******************************************

# If readRoutingTable is set to yes, all IP address configuration
# used by NSIS is derived from the local IP routing tables and
# interface information. 
# NOTE: If readRoutingTable is set to yes, all remaining IP address
# configuration in this file is NOT used by NSIS.
readRoutingTable = yes

# CAUTION: The address configuration is like a routing table. 

# This example IPv4 configuration contains a default route
# as well as special configuration for two network segments
# (i.e 192.168.0.0/24 and 192.168.1.0/24)
IPv4.entries = 3

# The first entry is meant as a default route. It is used when
# no subsequent entry matches. 
IPv4[0].addr = 192.168.10.1
IPv4[0].net  = 192.168.10.0
IPv4[0].mask = 24
# Use this address as the external address for NatFW NSLP
IPv4[0].natfw.useAsExternalAddress = no
# Default network is public (i.e. the global internet)
IPv4[0].natfw.isPrivateNet = no


# This entry defines the outgoing local interface card
IPv4[1].addr = 192.168.10.1
# These entries define the network segment you want to reach 
# with the previously defined outgoing interface card
IPv4[1].net  = 192.168.0.0
IPv4[1].mask = 24
# The network 192.168.0.0/24 is private 
IPv4[1].natfw.isPrivateNet = yes

# The second network (192.168.1.0/24) uses the SAME outgoing
# interface again.
IPv4[2].addr = 192.168.20.1
IPv4[2].net  = 192.168.20.0
IPv4[2].mask = 24
# The network 192.168.1.0/24 is private 
IPv4[2].natfw.isPrivateNet = yes

# The second network (192.168.1.0/24) uses the SAME outgoing
# interface again.
IPv4[3].addr = 192.168.30.1
IPv4[3].net  = 192.168.30.0
IPv4[3].mask = 24
# The network 192.168.1.0/24 is private
IPv4[3].natfw.isPrivateNet = yes

# The second network (192.168.1.0/24) uses the SAME outgoing
# interface again.
IPv4[4].addr = 192.168.40.1
IPv4[4].net  = 192.168.40.0
IPv4[4].mask = 24
# The network 192.168.1.0/24 is private
IPv4[4].natfw.isPrivateNet = yes

# IPv6 configuration with 1 address: (just remove this part completely 
# if there is no IPv6 support on your maschine)
#IPv6.entries = 0
#IPv6[0].addr = fec0:1::4321:ff:ee12:3355
#IPv6[0].net  = fec0:1::4321:ff:ee12:3355
#IPv6[0].mask = 0



# *******************************************
# *****    NatFW NSLP Configuration     *****
# *******************************************

# This host runs a NAT, but no firewall
natfw.isNAT = no
natfw.isFW = no

# Hosts inside the private network can reserve external addresses/ports.
# As the above configuration shows, 10.0.0.1 is the only external address this
# router has to offer:
natfw.resources.IPv4.entries = 0
natfw.resources.IPv4[0].addr = 10.0.0.1


# *******************************************
# *****     QoS NSLP Configuration      *****
# *******************************************

# Choose the RMF: ClsRMF, SimpleRMF and NullRMF (default) are available.
# See man page on what they do. (case does not matter)
qos.rmf = NullRMF
qos.debuglevel = 3
qos.reliable = true

## Configuration related to the SimpleRMF
# Use Traffic Control on these addresses if SimpleRMF is used:
qos.simplermf.interfaces = eth0

# Specify maximum overall bandwidth of the interface (default 100mbit)
qos.simplermf.interface[eth0].overall_bandwidth = 100mbit

# Specify mininum bandwidth, that unclassified traffic can use (default 100kbit)
# (Unclassified traffic is such traffic, that is not part of any known flow)
qos.simplermf.interface[eth0].min_unclassified_bandwidth = 100kbit

# Specify maximum bandwidth, that unclassified traffic can use 
# (default is maximum overall bandwidth)
qos.simplermf.interface[eth0].max_unclassified_bandwidth = 100mbit
\end{verbatim} 

\subsection{Arquivos Cenários 1}
\label{cenario_cenario1}
Os nós sofreram as seguintes alterações para funcionamento:

\begin{figure}[!htpb]
 \centering
 \includegraphics[scale=.6]{figs/cenario.png}
 \caption{Cenário 1}
 \label{fig:cap6_cenario_ambiente1}
\end{figure}

\begin{itemize}
 \item Configuração do nó QNI (Que fará sinalização)
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim}

\item Configuração do nó QNI (Apenas para gerar tráfego)
Não é necessário rodar o nsis neste host

 \item Configuração do nó QNE
\begin{verbatim}
readRoutingTable = yes

# *******************************************
# *****     QoS NSLP Configuration      *****
# *******************************************

# Choose the RMF: ClsRMF, SimpleRMF and NullRMF (default) are available.
# See man page on what they do. (case does not matter)
qos.rmf = SimpleRMF
qos.debuglevel = 3
qos.reliable = true

\end{verbatim} 
 \item Configuração QNR
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim} 
\end{itemize}
%------------------------------------------------------------------%
\subsection{Arquivos Cenários 2}
\label{cenario_cenario2}

Os nós sofreram as seguintes alterações para funcionamento:

\begin{figure}[!htpb]
 \centering
 \includegraphics[scale=.5]{figs/cenario2.png}
 \caption{Sinalização de reserva com query}
 \label{fig:cap6_cenario_ambiente2}

\end{figure}
\begin{itemize}
 \item Configuração do nó QNI (Que fará sinalização)
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim}

 \item Configuração do nó QNE
\begin{verbatim}
readRoutingTable = yes

# *******************************************
# *****     QoS NSLP Configuration      *****
# *******************************************

# Choose the RMF: ClsRMF, SimpleRMF and NullRMF (default) are available.
# See man page on what they do. (case does not matter)
qos.rmf = SimpleRMF
qos.debuglevel = 3
qos.reliable = true

\end{verbatim} 
 \item Configuração QNR
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim} 
\end{itemize}

%------------------------------------------------------------------%
\subsection{Arquivos Cenários 3}
\label{cenario_cenario3}

Os nós sofreram as seguintes alterações para funcionamento:

\begin{figure}[!htpb]
 \centering
 \includegraphics[scale=.4]{figs/cenario_reserve1.png}
 \caption{Sinalização de reserva}
 \label{fig:cap6_cenario_reserve3}
\end{figure}

\begin{itemize}
 \item Configuração do nó QNI (Que fará sinalização)
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim}

 \item Configuração do nó QNE
\begin{verbatim}
readRoutingTable = yes

# *******************************************
# *****     QoS NSLP Configuration      *****
# *******************************************

# Choose the RMF: ClsRMF, SimpleRMF and NullRMF (default) are available.
# See man page on what they do. (case does not matter)
qos.rmf = SimpleRMF
qos.debuglevel = 3
qos.reliable = true

\end{verbatim} 
 \item Configuração QNR
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim} 
\end{itemize}


%------------------------------------------------------------------%
\subsection{Arquivos Cenários 4}
\label{cenario_cenario4}

Os nós sofreram as seguintes alterações para funcionamento:

\begin{figure}[!htpb]
 \centering
 \includegraphics[scale=.5]{figs/cenario4.png}
 \caption{Cenário com reserva de recurso}
 \label{fig:cap6_cenario4}
\end{figure}

\begin{itemize}
 \item Configuração do nó QNI (Que fará sinalização)
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim}

\item Configuração do nó QNI (Apenas para gerar tráfego)
Não é necessário rodar o nsis neste host

 \item Configuração do nó QNE
\begin{verbatim}
readRoutingTable = yes

# *******************************************
# *****     QoS NSLP Configuration      *****
# *******************************************

# Choose the RMF: ClsRMF, SimpleRMF and NullRMF (default) are available.
# See man page on what they do. (case does not matter)
qos.rmf = SimpleRMF
qos.debuglevel = 3
qos.reliable = true

\end{verbatim} 
 \item Configuração QNR
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim} 
\item Configuração QNR
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim} 
\end{itemize}

%------------------------------------------------------------------%
\subsection{Arquivos Cenários 5}
\label{cenario_cenario5}

Os nós sofreram as seguintes alterações para funcionamento:

\begin{figure}[!htpb]
 \centering
 \includegraphics[scale=.4]{figs/cenario5.png}
 \caption{Sinalização com mudanca de rota}
 \label{fig:cap6_cenario_change_route}
\end{figure}

\begin{itemize}
 \item Configuração do nó QNI (Que fará sinalização)
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim}

\item Configuração do nó QNI (Apenas para gerar tráfego)
Não é necessário rodar o nsis neste host

 \item Configuração do nó QNE
\begin{verbatim}
readRoutingTable = yes

# *******************************************
# *****     QoS NSLP Configuration      *****
# *******************************************

# Choose the RMF: ClsRMF, SimpleRMF and NullRMF (default) are available.
# See man page on what they do. (case does not matter)
qos.rmf = SimpleRMF
qos.debuglevel = 3
qos.reliable = true

\end{verbatim}

 \item Configuração QNR
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim} 

\item Configuração QNR
\begin{verbatim}
readRoutingTable = yes
qos.rmf = NullRMF
\end{verbatim} 

\end{itemize}